﻿@model kxcxw.Data.Entities.AdApply
@using kxcxw.Data.Common
@{
    ViewBag.Title = "申请详情";
    Layout = "~/Areas/Admin/Views/Shared/_InfoLayout.cshtml";
    CommonRepositories cr = new CommonRepositories();
}
<h2>
    @Html.ActionLink("信息管理", "Index") &raquo; @Html.ActionLink("广告详情", "Details", "AdM", null, new { @class = "active" })</h2>
<div id="main">
    <fieldset>
        <div class="display-label">
            编号：</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.AdBlockId)
        </div>
        <div class="display-label">
            文本信息：</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.AltText)
        </div>
        <div class="display-label">
            图片：</div>
        <div class="display-field" style="background-color: #cccccc; border:1px solid #666666; height:auto!important;overflow-x:auto">
            <img alt="" style="margin:5px;" src="@Url.Content("~/" + KXCXW.Web.CommonClass.AdHelper.ImgRootUrl + Model.ImgName)" />
        </div>
        <div class="display-label">
            连接：</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Href)
        </div>
        <div class="display-label">
            有效期：</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.EffectiveDays)
        </div>
        @if (string.IsNullOrEmpty(Model.UserID))
        {
            <div class="display-label">
                申请人/单位：</div>
            <div class="display-field">
                @Html.DisplayFor(model => model.ApplyerName)
            </div>

            <div class="display-label">
                联系电话：</div>
            <div class="display-field">
                @Html.DisplayFor(model => model.Phone)
            </div>
        }
        else
        {
            <div class="display-label">
                用户名：</div>
            <div class="display-field">
                @cr.getUserById(Model.UserID).UserName
            </div>
        }
        <div class="display-label">
            当前状态：</div>
        <div class="display-field">
            @if (Model.Status == 0)
            {
                @("等待审核")
            }
            else if (Model.Status == 1)
            {
                @("通过审核") 
            }
            else if (Model.Status == 2)
            {
                @("未通过审核") 
            }
            else if (Model.Status == 3)
            {
                @("已停用") 
            }
        </div>
        @if (!string.IsNullOrEmpty(Model.ApprovalUser))
        {
            <div class="display-label">
                审核时间：</div>
            <div class="display-field">
                @Html.DisplayFor(model => model.ApprovalDate)
            </div>
            <div class="display-label">
                审核人：</div>
            <div class="display-field">
                @cr.getUserById(Model.ApprovalUser).UserName
            </div>
        }
        <div class="display-label">
            申请时间：</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.CreateDate)
        </div>
    </fieldset>
</div>
